﻿<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:XMindAPI.TestApp" x:Class="XMindAPI.TestApp.MainWindow"
        Title="XMindAPI for C# test application" Height="230" Width="600" WindowStyle="ToolWindow">
    <Grid x:Name="LayoutRoot" Margin="10">
        <Grid.DataContext>
            <local:FileData/>
        </Grid.DataContext>
        
        <TabControl SelectionChanged="Tabs_SelectionChanged">
            <TabItem Header="Create" Tag="Create">
                <Grid>
                <Grid.RowDefinitions>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
                <RowDefinition Height="24"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
        
            <TextBlock Grid.Row="0" Grid.Column="0" Margin="0,4,0,4" Text="Step 1: Select output file"/>
            <TextBlock Grid.Row="2" Grid.Column="0" Margin="0,4,0,4" Text="Step 2: Create workbook"/>
            <TextBlock Grid.Row="4" Grid.Column="0" Margin="0,4,0,4" Text="Step 3: Open workbook"/>
        
            <Button Grid.Row="0" Grid.Column="1" Margin="2" Content="Browse..." Width="60" Click="Browse_Click" HorizontalAlignment="Left"/>
            <Button Grid.Row="2" Grid.Column="1" Margin="2" Content="Create" Width="60" Click="Create_Click" Visibility="{Binding VisibleIfFileSelected, Mode=OneWay}" HorizontalAlignment="Left"/>

            <TextBlock Margin="0,4,0,4" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2">
                <Hyperlink NavigateUri="{Binding FileUri}" RequestNavigate="NavigateUri_RequestNavigate"><InlineUIContainer>
            		    <TextBlock Text="{Binding FileName}" Visibility="{Binding VisibleIfFileExists, Mode=OneWay}"/>
            	    </InlineUIContainer>
                </Hyperlink>
            </TextBlock>
            </Grid>
            </TabItem>
            <TabItem Header="Read" Tag="Read">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="24"/>
                        <RowDefinition Height="24"/>
                        <RowDefinition Height="24"/>
                        <RowDefinition Height="24"/>
                        <RowDefinition Height="24"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="150"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="Auto"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Grid.Row="0" Grid.Column="0" Margin="0,4,0,4" Text="Step 1: Select input file"/>
                    <TextBlock Grid.Row="2" Grid.Column="0" Margin="0,4,0,4" Text="Step 2: Read workbook"/>
                    <TextBlock Grid.Row="4" Grid.Column="0" Margin="0,4,0,4" Text="Step 3: Open read report"/>

                    <Button Grid.Row="0" Grid.Column="1" Margin="2" Content="Browse..." Width="60" Click="Browse_Click" HorizontalAlignment="Left"/>
                    <Button Grid.Row="2" Grid.Column="1" Margin="2" Content="Read" Width="60" Click="Read_Click" Visibility="{Binding VisibleIfFileSelected, Mode=OneWay}" HorizontalAlignment="Left"/>

                    <TextBlock Margin="0,4,0,4" Grid.Row="5" Grid.Column="1" Grid.ColumnSpan="2">
                    <Hyperlink NavigateUri="{Binding FileUri}" RequestNavigate="NavigateUri_RequestNavigate"><InlineUIContainer>
            		        <TextBlock Text="{Binding FileName}" Visibility="{Binding VisibleIfFileExists, Mode=OneWay}"/>
            	        </InlineUIContainer>
                    </Hyperlink>
                </TextBlock>
            </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</Window>
